package com.ag.wsq.action;

import java.util.List;

import org.apache.log4j.Logger;

import com.ag.bean.TbDetailShift;
import com.ag.bean.TbDuty;
import com.ag.bean.TbShiftType;
import com.ag.bean.TbUser;
import com.ag.bean.TbWorkDay;
import com.ag.common.BaseAction;
import com.ag.wsq.service.impl.SchedBaseServiceImpl;
/*
 * @author 王淑其
 */
public class SchedBaseAction extends BaseAction {
	private static Logger logger = Logger.getLogger(SchedBaseAction.class);
	
	private SchedBaseServiceImpl schedBaseServiceImpl;
	private List<TbUser> tbUsers;
	private List<TbDetailShift> tbDetailShifts;
	private List<TbDuty> tbDuties;
	private List<TbWorkDay> tbWorkDays;
	private List<TbShiftType> tbShiftTypes;
	private String duId1;

	/**
	 * 获取所有用户
	 * @return json
	 */
	public String getAllUser(){
		logger.info("start get AllUser");
		this.tbUsers = schedBaseServiceImpl.getAllUser();
		return "getAllUser";
	}
	/**
	 * 获取所有岗位
	 * @return json
	 */
	public String getAllDuty(){
		logger.info("start get AllDuty");
		this.tbDuties = schedBaseServiceImpl.getAllDuty();
		return "getAllDuty";
	}
	/**
	 * 获取所有班次
	 * @return json
	 */
	public String getAllDShift(){
		logger.info("start get AllDShift");
		this.tbDetailShifts = schedBaseServiceImpl.getAllDShift();
		return "getAllDShift";
	}
	/**
	 * 获取对应岗位的所有班次
	 * @return json
	 */
	public String getDShift(){
		logger.info("start get DShift");
		this.tbDetailShifts = schedBaseServiceImpl.getDShift(duId1);
		return "getDShift";
	}
	/**
	 * 获取所有班次类型
	 * @return json
	 */
	public String getAllSType(){
		logger.info("start get AllDShift");
		this.tbShiftTypes = schedBaseServiceImpl.getAllSType();
		return "getAllSType";
	}
	/**
	 * 获取所有工作日
	 * @return json
	 */
	public String getAllWDay(){
		logger.info("start get AllWDay");
		this.tbWorkDays = schedBaseServiceImpl.getAllWDay();
		return "getAllWDay";
	}
	public SchedBaseServiceImpl getSchedBaseServiceImpl() {
		return schedBaseServiceImpl;
	}
	public void setSchedBaseServiceImpl(SchedBaseServiceImpl schedBaseServiceImpl) {
		this.schedBaseServiceImpl = schedBaseServiceImpl;
	}
	public List<TbUser> getTbUsers() {
		return tbUsers;
	}
	public void setTbUsers(List<TbUser> tbUsers) {
		this.tbUsers = tbUsers;
	}
	public List<TbDetailShift> getTbDetailShifts() {
		return tbDetailShifts;
	}
	public void setTbDetailShifts(List<TbDetailShift> tbDetailShifts) {
		this.tbDetailShifts = tbDetailShifts;
	}
	public List<TbDuty> getTbDuties() {
		return tbDuties;
	}
	public void setTbDuties(List<TbDuty> tbDuties) {
		this.tbDuties = tbDuties;
	}
	public List<TbWorkDay> getTbWorkDays() {
		return tbWorkDays;
	}
	public void setTbWorkDays(List<TbWorkDay> tbWorkDays) {
		this.tbWorkDays = tbWorkDays;
	}
	public List<TbShiftType> getTbShiftTypes() {
		return tbShiftTypes;
	}
	public void setTbShiftTypes(List<TbShiftType> tbShiftTypes) {
		this.tbShiftTypes = tbShiftTypes;
	}
	public String getDuId1() {
		return duId1;
	}
	public void setDuId1(String duId1) {
		this.duId1 = duId1;
	}

}
